
/**
 * @brief    Defines element distributions of property data.
 *
 * @version  0.1
 * @author   wuxingchuang
 * @date     2024.11.23
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Property/PropertyBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct PDISTBData : public PropertyBase
{
    struct ELEMData
    {
        SG::DataStructure::Common::Real m_VAL  = 0.0;  ///< Real value of item to be changed
        SG::DataStructure::Common::I64  m_VALI = 0;    ///< Integer value of item to be changed
    };

    SG::DataStructure::Common::I64 m_TYPE = 0;         ///< Property entry type 1:pshell 2:pcomp 3:pcompg 5:pbeam 6:pbeam3
                                                       ///< 7:pbar 8:prod 9:pshear 10:ptube
    SG::DataStructure::Common::Id  m_pId    = 0;       ///< Property identification number
    SG::DataStructure::Common::I64 m_PNAME  = 0;       ///< Field location number converted from property name
    SG::DataStructure::Common::I64 m_LOCNUM = 0;       ///< PCOMP[G]:numerical order of ply; PBEAM[3]:station #;
                                                       ///< PBCOMP:integraion pt.
    SG::DataStructure::Common::Real m_SCALE    = 0.0;  ///< Scaling of distribution entries
    SG::DataStructure::Common::Real m_OFFSET   = 0.0;  ///< Offset of distribution entries
    SG::DataStructure::Common::Id   m_domainId = 0;    ///<

    std::vector<ELEMData> m_ELEMList;
};

///@{ @brief operator override
DECLSPEC bool operator== (const PDISTBData::ELEMData& val1, const PDISTBData::ELEMData& val2);

DECLSPEC bool operator== (const PDISTBData& val1, const PDISTBData& val2);
///}@
SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
